Allow unsetting a pattern by passing NULL. (#156720, Tristan Van Berkom)
authorMatthias Clasen <mclasen@redhat.com>
Wed, 3 Nov 2004 06:20:33 +0000 (06:20 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 3 Nov 2004 06:20:33 +0000 (06:20 +0000)
2004-11-03  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtklabel.c (gtk_label_set_pattern_internal): Allow
unsetting a pattern by passing NULL.  (#156720, Tristan Van Berkom)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtklabel.c

index 61c83ea521978deadc76aecd2b8323e21fdacd74..03fa58ae922ba6064f9ab5ef1f9790c4ce5d95ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-11-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtklabel.c (gtk_label_set_pattern_internal): Allow
+       unsetting a pattern by passing NULL.  (#156720, Tristan Van Berkom)
+
        * gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash 
        if the active_row reference has become invalid.  (#157156,
        Christophe Fergeau)
index 61c83ea521978deadc76aecd2b8323e21fdacd74..03fa58ae922ba6064f9ab5ef1f9790c4ce5d95ca 100644 (file)
@@ -1,5 +1,8 @@
 2004-11-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtklabel.c (gtk_label_set_pattern_internal): Allow
+       unsetting a pattern by passing NULL.  (#156720, Tristan Van Berkom)
+
        * gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash 
        if the active_row reference has become invalid.  (#157156,
        Christophe Fergeau)
index 61c83ea521978deadc76aecd2b8323e21fdacd74..03fa58ae922ba6064f9ab5ef1f9790c4ce5d95ca 100644 (file)
@@ -1,5 +1,8 @@
 2004-11-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtklabel.c (gtk_label_set_pattern_internal): Allow
+       unsetting a pattern by passing NULL.  (#156720, Tristan Van Berkom)
+
        * gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash 
        if the active_row reference has become invalid.  (#157156,
        Christophe Fergeau)
index 61c83ea521978deadc76aecd2b8323e21fdacd74..03fa58ae922ba6064f9ab5ef1f9790c4ce5d95ca 100644 (file)
@@ -1,5 +1,8 @@
 2004-11-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtklabel.c (gtk_label_set_pattern_internal): Allow
+       unsetting a pattern by passing NULL.  (#156720, Tristan Van Berkom)
+
        * gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash 
        if the active_row reference has become invalid.  (#157156,
        Christophe Fergeau)
index 7ae2fb0b954d37cb501413a6139f71304833ed7a..066e29f2e1f2a3ef8e8da3d1350ce53247bef760 100644 (file)
@@ -1281,7 +1281,10 @@ gtk_label_set_pattern_internal (GtkLabel    *label,
   PangoAttrList *attrs;
   g_return_if_fail (GTK_IS_LABEL (label));
   
-  attrs = gtk_label_pattern_to_attrs (label, pattern);
+  if (pattern)
+    attrs = gtk_label_pattern_to_attrs (label, pattern);
+  else
+    attrs = NULL;
 
   if (label->effective_attrs)
     pango_attr_list_unref (label->effective_attrs);